package com.example.projectgamefinal1;

import android.view.View;
import android.webkit.WebView.FindListener;
import android.widget.AdapterView;
import android.widget.Spinner;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.Toast;

public class CustomOnItemSelectedListener implements OnItemSelectedListener {
	private Spinner spinner1, spinner2, spinner3;
	
	
	public void onItemSelected(AdapterView<?> parent, View view, int pos,
			long id) {
				
		/*if (parent.getId()==0x7f09000d)
		{
			if (parent.getItemAtPosition(pos).toString() != "-")
			{
				spinner2.setSelection(0);
				spinner3.setSelection(0);
			}
		}
		if(parent.getId()==0x7f09000a)
		{
			if (parent.getItemAtPosition(pos).toString() != "-")
			{
				spinner1.setSelection(0);
				spinner3.setSelection(0);
			}
		}
		if(parent.getId()==0x7f09000f)
		{
			if (parent.getItemAtPosition(pos).toString() != "-")
			{
				spinner1.setSelection(0);
				spinner2.setSelection(0);
			}
		}*/
		Toast.makeText(
				parent.getContext(),
				"OnItemSelectedListener : "
						+ parent.getItemAtPosition(pos).toString(),
				Toast.LENGTH_SHORT).show();
				
		
		
	}

	@Override
	public void onNothingSelected(AdapterView<?> arg0) {
		// TODO Auto-generated method stub
	}
}
